<template>
  <div>
    <p>新闻：<input type="text" v-model="form.title"></p>
    <button @click="add">添加</button>
  </div>
</template>

<script>
export default {
  name: "news",
  data() {
    return {
      form: {}
    }
  },
  methods: {
    add() {
      this.$axios.post('http://192.168.1.203:5000/', this.form)
        .then(res => {
          if (res.data.code == 200) {
            alert('添加成功')
          }


        })
    }

  }
}
</script>

<style scoped>

</style>
